<include file="Public:header_content" />

        
        <div class="row">
           
                    <div class="ibox-content">
                        <form id='add-member-form' class="form-horizontal m-t" method="post" action="__SELF__" >
                            <div class="form-group">
                                <label class="col-sm-3 control-label">名称：</label>
                                <div class="col-sm-6">
                                    <input id="name" name="name" class="form-control" value="" type="text" >
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-3 control-label">所需积分：</label>
                                <div class="col-sm-3">
                                    <input id="point" name="point" class="form-control" type="text" >
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-3 control-label">是否默认：</label>
                                <div class="col-sm-2">
                                    <select name="default_lv" class="form-control">
                                        <option value="1" selected>否</option>
                                        <option value="2" >是</option>
                                    </select>
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-3 control-label">上一级ID：</label>
                                <div class="col-sm-2">
                                    <select name="pre_id" class="form-control">
                                        <option value="0">无</option>
                                        <volist name="lvs.lists" id="vo">
                                            <option value="<{$vo.member_lv_id}>"><{$vo.name}></option>
                                        </volist>
                                    </select>
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-3 control-label">备注：</label>
                                <div class="col-sm-5">
                                    <textarea id="lv_remark" name="lv_remark" class="form-control" ></textarea>
                                </div>
                            </div>
                            <div class="form-group">
                                
                                    <div class="modal-footer">
                                        <button type="button" class="btn btn-white" data-dismiss="modal">关闭</button>
                                        <button type="submit" class="btn btn-primary">保存</button>
                                    </div>
                                
                            </div>
                        </form>
           
            </div>
        </div>

    
<include file="Public:footer_content" />
<script>
    $.validator.setDefaults({
	highlight:function(e){
		$(e).closest(".form-group").removeClass("has-success").addClass("has-error")},
		success:function(e){
			e.closest(".form-group").removeClass("has-error").addClass("has-success")
		},
		errorElement:"span",
		errorPlacement:function(e,r){
			e.appendTo(r.is(":radio")||r.is(":checkbox")?r.parent().parent().parent():r.parent())
		},
		errorClass:"help-block m-b-none",
		validClass:"help-block m-b-none"
	});
    
    $().ready(function() {
        var e="<i class='fa fa-times-circle'></i> ";
        $("#add-member-form").validate({
			rules:{
				name:{
                                    required:true,
                                    rangelength:[1,10],
//                                    remote: {
//                                        url: "<{:U('Public/checkRepeatMobile')}>",     //后台处理程序
//                                        type: "post",               //数据发送方式
//                                        dataType: "json",           //接受数据格式   
//                                        data: {                     //要传递的数据
//                                            mobile:function(){
//                                                return $('#mobile').val();
//                                            }
//                                        }
//                                    }
                                },
				point:{required:!0,digits:true,min:0,rangelength:[1,7]},
				pre_id:{required:!0,},
				default_lv:{required:!0},
				lv_remark:{}
			},
			messages:{
				name:{
                                    required:e+"请输入",
                                    rangelength:e+"必须两个字符以上1到10个字符之间"
                                },
			}
		});
                
    });
</script>